<template>
    <view>
        <!-- pages/order/kuaidimsg.wxml -->
        <header name="物流详情" :type="1"></header>
        <view class="kuaidimsg">
            <view>
                <text>订单编号：</text>
                <view>
                    <text>{{ orderid }}</text>
                    <text class="copy">复制</text>
                </view>
            </view>
            <view>
                <text>配送服务：</text>
                <view>
                    <text>{{ winfo.expName }}</text>
                </view>
            </view>
            <view>
                <text>快递单号：</text>
                <view>
                    <text>{{ winfo.number }}</text>
                </view>
            </view>
            <text class="kbtn">我要催单</text>
        </view>
        <view class="wuliu">
            <view class="wuliulist" v-for="(item, index) in winfo.list" :key="index">
                <view class="point"></view>

                <view class="msg">
                    <text>{{ item.status }}</text>
                    <text>{{ item.time }}</text>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
import header from '../../components/header/headerBar.vue';
// pages/order/kuaidimsg.js
const app = getApp();
export default {
    components: {
        header
    },
    data() {
        return {
            orderid: '',

            winfo: {
                expName: '',
                number: '',
                list: []
            }
        };
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        this.setData({
            orderid: options.orderid
        });
        this.init();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        init() {
            var _this = this;

            app.globalData
                .http()
                .getwuliu({
                    orderid: this.orderid
                })
                .then((res) => {
                    _this.setData({
                        winfo: res
                    });
                })
                .catch((res) => {});
        }
    }
};
</script>
<style lang="scss"> @import 'main.scss';
@import './kuaidimsg.scss';
</style>
